home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / totsrc.zip / EXTFAST.PAS next >
Pascal/Delphi Source File  |  1991-02-11  |  1KB  |  57 lines

  1. Unit ExtFast;
  2. {Illustrates how you can replace the Toolkit screen writing routines. In
  3.  this case, the object MonoWriteOBJ intercepts all color attributes and 
  4.  replaces them with White-on-Black.}
  5.  
  6. {$I TOTFLAGS.INC}
  7.  
  8. INTERFACE
  9.  
  10. uses DOS, CRT, totFAST;
  11.  
  12. TYPE
  13.  
  14. MonoWriteOBJ = object (WriteOBJ)
  15.    constructor Init;
  16.    procedure   WriteAT(X,Y,attr:byte;Str:string);                     VIRTUAL;
  17.    procedure   ChangeAttr(X,Y,Att:byte;Len:word);                     VIRTUAL;
  18.    procedure   Clear(Att:byte;Ch:char);                               VIRTUAL;
  19.    destructor  Done;                                                  VIRTUAL;
  20. end; {MonoWriteOBJ}
  21.  
  22. IMPLEMENTATION
  23.  
  24. constructor MonoWriteOBJ.Init;
  25. {}
  26. begin
  27.    WriteOBJ.Init;
  28.    TextColor(white);
  29.    Textbackground(black);
  30. end; {MonoWriteOBJ.Init}
  31.  
  32. procedure MonoWriteOBJ.WriteAT(X,Y,attr:byte;Str:string);
  33. {}
  34. begin
  35.    WriteOBJ.WriteAT(X,Y,white,Str);
  36. end; {MonoWriteOBJ.WriteAT}
  37.  
  38. procedure MonoWriteOBJ.ChangeAttr(X,Y,Att:byte;Len:word);
  39. {}
  40. begin
  41.    WriteOBJ.ChangeAttr(X,Y,white,Len);
  42. end; {MonoWriteOBJ.ChangeAttr}
  43.  
  44. procedure MonoWriteOBJ.Clear(Att:byte;Ch:char);
  45. {}
  46. begin
  47.    WriteOBJ.Clear(white,Ch);
  48. end; {MonoWriteOBJ.Clear}
  49.  
  50. destructor MonoWriteOBJ.Done;
  51. {}
  52. begin
  53.    WriteOBJ.Done;
  54. end; {MonoWriteOBJ.Done}
  55.  
  56. end.
  57.